//
//  XXSPMainTableCell.m
//  ShangChengMoBan
//
//  Created by 张铁军 on 16/8/27.
//  Copyright © 2016年 ping. All rights reserved.
//

#import "XXSPMainTableCell.h"

@implementation XXSPMainTableCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initView];
    }
    return self;
    
}

-(void)initView{
    _showImageView = [[UIImageView alloc]initWithFrame:CGRectMake(10* _kscW , 10 * _kscH , 100 * _kscW, 80 * _kscH)];
    _showImageView.layer.cornerRadius = 5 ;
    _showImageView.clipsToBounds = YES;
    _showImageView.contentMode = UIViewContentModeScaleAspectFill;
    [self.contentView addSubview:_showImageView];
    
    _nameLabel = [[BaseLabel alloc]initWithFrame:CGRectMake(_showImageView.right+10 * _kscW, _showImageView.top, KScreenWidth - 130 * _kscW, 20 * _kscH)andFont:PuTongFont + 1];
    _nameLabel.textColor = MaintextColor;
    [self.contentView addSubview:_nameLabel];
    
    _jianJieLabel = [[BaseLabel alloc]initWithFrame:CGRectMake(_nameLabel.left, _nameLabel.bottom, _nameLabel.width, 15 * _kscH)andFont:PuTongFont-3];
    _jianJieLabel.textColor = [UIColor lightGrayColor];
    
    [self.contentView addSubview:_jianJieLabel];
    
    _renJunJiaLabel = [[BaseLabel alloc]initWithFrame:CGRectMake(_nameLabel.left, _jianJieLabel.bottom, _nameLabel.width, _nameLabel.height)andFont:PuTongFont];
    _renJunJiaLabel.textColor = [UIColor lightGrayColor];
    [self.contentView addSubview:_renJunJiaLabel];
    
    _maiDanBtn = [[UIButton alloc]initWithFrame:CGRectMake(_nameLabel.left, _renJunJiaLabel.bottom, 60 * _kscH, 20 * _kscH)];
    _maiDanBtn.layer.cornerRadius = 4;
    [_maiDanBtn setTitle:@"点击买单" forState:UIControlStateNormal];
    [_maiDanBtn setTitleColor:ZONGCOLOR forState:UIControlStateNormal];
    _maiDanBtn.layer.borderColor = [ZONGCOLOR CGColor];
    _maiDanBtn.titleLabel.font = [UIFont systemFontOfSize:PuTongFont -1];
    _maiDanBtn.layer.borderWidth = 0.5;
    [self.contentView addSubview:_maiDanBtn];
    
   [self.contentView addSubview:[UILabel drawXiaHuaXianLabel:100 * _kscH-0.5]];
    
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
